<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理后台 - 图书借阅系统</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <style>
        body {
            background-color: #f8f9fa;
        }
        .sidebar {
            background-color: #343a40;
            min-height: calc(100vh - 56px);
        }
        .sidebar .nav-link {
            color: #adb5bd;
            padding: 15px 20px;
            border-bottom: 1px solid #495057;
        }
        .sidebar .nav-link:hover {
            background-color: #495057;
            color: white;
        }
        .sidebar .nav-link.active {
            background-color: #007bff;
            color: white;
        }
        .content {
            padding: 20px;
        }
        .card-stats {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <div class="container-fluid">
            <a class="navbar-brand" href="/admin/dashboard">
                <i class="fas fa-cogs"></i> 管理后台
            </a>
            <div class="navbar-nav ms-auto">
                <span class="navbar-text me-3">
                    管理员
                </span>
                <a class="nav-link" href="/admin/logout">退出登录</a>
            </div>
        </div>
    </nav>

    <div class="container-fluid">
        <div class="row">
            <!-- 侧边栏 -->
            <div class="col-md-2">
                <div class="sidebar">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link active" href="/admin/dashboard">
                                <i class="fas fa-tachometer-alt me-2"></i>仪表盘
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="/admin/books">
                                <i class="fas fa-book me-2"></i>图书管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="/admin/readers">
                                <i class="fas fa-users me-2"></i>读者管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="/borrow/admin/borrowing">
                                <i class="fas fa-hand-holding me-2"></i>借阅管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="/borrow/admin/overdue">
                                <i class="fas fa-exclamation-triangle me-2"></i>逾期管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="/book/add">
                                <i class="fas fa-plus me-2"></i>添加图书
                            </a>
                        </li>
                    </ul>
                </div>
            </div>

            <!-- 主内容区 -->
            <div class="col-md-10">
                <div class="content">
                    <h2>管理仪表盘</h2>
                    <hr>
                    
                    <div class="row">
                        <div class="col-md-3">
                            <div class="card card-stats">
                                <div class="card-body text-center">
                                    <i class="fas fa-book fa-3x mb-3"></i>
                                    <h4>图书总数</h4>
                                    <h2>0</h2>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="card card-stats" style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);">
                                <div class="card-body text-center">
                                    <i class="fas fa-users fa-3x mb-3"></i>
                                    <h4>读者总数</h4>
                                    <h2>0</h2>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="card card-stats" style="background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);">
                                <div class="card-body text-center">
                                    <i class="fas fa-hand-holding fa-3x mb-3"></i>
                                    <h4>当前借阅</h4>
                                    <h2>0</h2>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="card card-stats" style="background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);">
                                <div class="card-body text-center">
                                    <i class="fas fa-exclamation-triangle fa-3x mb-3"></i>
                                    <h4>逾期记录</h4>
                                    <h2>0</h2>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row mt-4">
                        <div class="col-md-6">
                            <div class="card">
                                <div class="card-header">
                                    <h5 class="mb-0">快速操作</h5>
                                </div>
                                <div class="card-body">
                                    <a href="/book/add" class="btn btn-primary mb-2 w-100">
                                        <i class="fas fa-plus"></i> 添加新图书
                                    </a>
                                    <a href="/admin/readers" class="btn btn-info mb-2 w-100">
                                        <i class="fas fa-users"></i> 管理读者
                                    </a>
                                    <a href="/borrow/admin/borrowing" class="btn btn-warning w-100">
                                        <i class="fas fa-list"></i> 查看借阅记录
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="card">
                                <div class="card-header">
                                    <h5 class="mb-0">系统信息</h5>
                                </div>
                                <div class="card-body">
                                    <p><strong>系统版本:</strong> 1.0.0</p>
                                    <p><strong>运行时间:</strong> 刚刚启动</p>
                                    <p><strong>最后更新:</strong> 2024-01-01</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap/5.3.2/js/bootstrap.bundle.min.js"></script>
</body>
</html>